<template>
  <div class="headertop">
    <el-form
      :inline="true"
      :model="rolesearch"
      class="demo-form-inline"
      size="mini"
      style="width: 100%"
    >
      <el-form-item :label="$t('rolesearch.rolename')">
        <el-input
          v-model="rolesearch.rolename"
          :placeholder="$t('rolesearch.rolename')"
          style="width: 100%"
        />
      </el-form-item>
      <el-form-item :label="$t('rolesearch.roledescribe')">
        <el-input
          v-model="rolesearch.roledescribe"
          :placeholder="$t('rolesearch.roledescribe')"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">{{
          $t("usersearch.query")
        }}</el-button>

        <el-button @click="onReset">{{ $t("usersearch.reset") }}</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Rolesearch',
  data() {
    return {
      rolesearch: {
        rolename: '',
        roledescribe: ''
      }
    }
  },
  methods: {
    onSubmit() {
      this.$emit('callSearch', this.rolesearch)
    },
    onReset() {
      this.rolesearch = {
        roleName: '',
        roleDescribe: ''
      }
    }
  }
}
</script>
<style  scoped>
.headertop{
  margin-top: 20px;
}
</style>
